package org.kiwi.data;

/**
 * Created by jack08.liu on 2016/10/20.
 */
public class ReadWriteSeparationHolder {

    private static final ThreadLocal<String> READ_WRITE_DATASOURCE_NAME = new ThreadLocal<>();

    public static String getReadWriteDatasourceName() {
        return READ_WRITE_DATASOURCE_NAME.get();
    }

    public static void setReadWriteDatasourceName(String readWriteDatasourceName) {
        READ_WRITE_DATASOURCE_NAME.set(readWriteDatasourceName);
    }

    public static void clear() {
        READ_WRITE_DATASOURCE_NAME.remove();
    }
}
